package yunquan.wang.modules.base.web;

import javax.annotation.Resource;
import javax.validation.Valid;

import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import yunquan.wang.base.service.BaseService;
import yunquan.wang.base.web.BaseController;
import yunquan.wang.modules.base.entity.Userinfo;
import yunquan.wang.modules.base.service.UserinfoService;
/**
 * Userinfo 页面控制器
 * @author 王云权   wangyunquan@gmail.com
 *  用生成器 生成于 2011-09-30 22:37
 *
 */
@Controller
@RequestMapping("/core/userinfo")
public class UserinfoController extends BaseController<Userinfo> {
	@Resource(name="userinfoService")
	private UserinfoService userinfoService;

	@Override
	public BaseService<Userinfo> getService() {
		return userinfoService;
	}
  
	@RequestMapping(value = "/list.do")
	public ModelAndView list() {
		return baseList();
	}
	
	@RequestMapping(value = "/save.do")
	public ModelAndView save(@Valid Userinfo entity,
			BindingResult bindingResult) {
		return baseSave(entity,bindingResult);
	}
	 
	@RequestMapping(value = "/view.do")
	public ModelAndView view() {
		return baseView();
	}
	 
	@RequestMapping(value = "/input.do")
	protected ModelAndView input() {
		return baseInput();
	}
	 
	@RequestMapping(value = "/delete.do")
	protected  ModelAndView delete() {
		return baseDelete();
	}

}
